package cn.miju.ser.framework.constant;

/**
 * <pre>
 * 系统常量类
 * </pre>
 *
 * @author zhuming
 * @version 1.0.0
 * @since 2023-03-11 21:51
 */
public class SerConstant {

    public static class Redis {
        public static final String BASE_KEY = "miju-pay:ser:";
        /**
         * 交易流水号缓存键，用于校验是否重复请求
         * 有效期60s
         */
        public static final String NONCE = BASE_KEY + "nonce:";
        /**
         * 扫码支付二维码缓存键，规则：SCAN_CODE_ORDER_QRCODE + 支付方式 + ":" + 商户订单号
         */
        public static final String SCAN_CODE_PAY_QRCODE = BASE_KEY + "scan_code_pay:qrcode:";
        /**
         * 商户信息缓存键
         * 规则：
         * 1、MERCHANT_INFO + ":" + 商户ID
         * 2、MERCHANT_INFO + ":" + 平台商户号
         */
        public static final String MERCHANT_INFO = BASE_KEY + "merchant_info:";
    }

}
